package com.aliyun.heiyu.powermaster.server.manager;

import com.aliyun.heiyu.powermaster.proto.StrategyControlHistory;
import com.aliyun.heiyu.powermaster.proto.StrategyDetail;
import com.aliyun.heiyu.powermaster.server.dao.entity.Strategy2DeviceEntity;
import com.aliyun.heiyu.powermaster.server.dao.entity.StrategyActionHistoryEntity;
import com.aliyun.heiyu.powermaster.server.dao.entity.StrategyEntity;

import java.util.List;

public interface StrategyManagerInterface {
    boolean insert(StrategyDetail strategyDetail);
    boolean patch(StrategyDetail strategyDetail);
    boolean delete(String[] ids);
    int getCountByCondition(String str, String type);
    List<StrategyDetail> getByCondition(String str, String type);
    List<StrategyDetail> getByCondition(String str, String type, int start, int size);
    StrategyDetail getStrategy(int strategyID);
    boolean deleteDevices(Object[] deviceList);
    boolean deleteDevices(int strategyID, Object[] deviceList);
    boolean deleteStrategyDevices(int strategyID, Object[] deviceList);
    boolean insertDevice(Strategy2DeviceEntity entity);
    int getCountHistoryByCondition(String deviceId);
    List<StrategyControlHistory> getHistoryByCondition(String deviceId);
    List<StrategyControlHistory> getHistoryByCondition(String deviceId, int start, int size);
    StrategyEntity getStrategyByDeviceId(String sn);
    StrategyDetail getStrategyDetailByDeviceId(String deviceID);
    boolean virtyStrategyIdExit(int strategyID);
    boolean virtyStrategyNameExit(String name);
    boolean insertActionHistory(StrategyActionHistoryEntity entity);
    List<StrategyDetail> getAllStrategiesOfOn();
    //不从缓存读取
    List<StrategyDetail> getAllStrategiesOfOn1();
    Strategy2DeviceEntity findByDeviceId(String sn);
}
